package com.tj.collection.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/2/26
 * Time: 上午11:26
 */
public enum OutboundDetailStatusEnum {
    UN_CALL(0, "未呼叫"),
    CALL_SUCCESS(1, "呼叫成功"),
    CALL_FAILED(2, "呼叫失败"),
    ;

    private Integer status;

    private String desc;

    OutboundDetailStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public OutboundDetailStatusEnum setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public OutboundDetailStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static OutboundDetailStatusEnum getEnum(Integer status) {
        for (OutboundDetailStatusEnum enums : OutboundDetailStatusEnum.values()) {
            if (enums.getStatus().equals(status)) {
                return enums;
            }
        }
        return null;
    }
}
